package jh.com.jhappbf.yuntuUnload;


import android.content.Intent;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.View.OnClickListener;
import android.view.ViewGroup;
import android.widget.ImageView;


import androidx.fragment.app.Fragment;
import jh.com.jhappbf.R;
import jh.com.jhappbf.unload.ComfirmhListView;
import jh.com.jhappbf.unload.UnloadQuery;

public class SaleUnloadManager extends Fragment implements OnClickListener {

    private ImageView mAddUnloadImg;
    private ImageView mQueryUnloadImg;
    @Override
    public View onCreateView(LayoutInflater inflater, ViewGroup container,
                             Bundle savedInstanceState) {
        View v = inflater.inflate(R.layout.unload_sale_activity, null);
        initView(v);
        return v;
    }

    /**
     * 初始化
     */
    private  void initView(View v)
    {
        mAddUnloadImg = (ImageView) v.findViewById(R.id.unload_add_img);
        mQueryUnloadImg = (ImageView) v.findViewById(R.id.unload_query_img);
        mAddUnloadImg.setOnClickListener(this);
        mQueryUnloadImg.setOnClickListener(this);
    }

    @Override
    public void onClick(View v) {
        switch (v.getId()) {
            case R.id.unload_add_img:
                Intent i = new Intent(getActivity(), ComfirmhListView.class);
                i.putExtra("mType","交货");
                i.putExtra("dinge","X");
                getActivity().startActivity(i);
                break;
            case R.id.unload_query_img:
                Intent i1 = new Intent(getActivity(), ComfirmhListView.class);
                i1.putExtra("mType","交货");
                i1.putExtra("dinge","");
                getActivity().startActivity(i1);
                break;
            default:
                break;
        }
    }
}
